<template>
	<!-- 商品详情 -->
	<view class="content page">
		<template v-if='fromShare == 1'>
			<!-- #ifdef MP -->
			<view class="top_back" @click="backHome()" :style="{top: menuButtonObject.top+'px'}">
				<image :src="staticUrl+ '/images/jh_up/icon-back-home.png'" class="icon-back-home"></image>
			</view>
			<!-- #endif -->
			<!-- #ifdef H5 -->
			<view class="top_back" @click="backHome()">
				<image :src="staticUrl+ '/images/jh_up/icon-back-home.png'" class="icon-back-home"></image>
			</view>
			<!-- #endif -->
		</template>
		<template v-else>
			<!-- #ifdef MP -->
			<view class="top_back" @click="back(1)" :style="{top: menuButtonObject.top+'px'}">
				<text class="icon-xiangzuo iconfont"></text>
			</view>
			<!-- #endif -->
			<!-- #ifdef H5 -->
			<view class="top_back" @click="back(1)">
				<text class="icon-xiangzuo iconfont"></text>
			</view>
			<!-- #endif -->
		</template>
		<backTop v-if='toTop'></backTop>
		
		
		<!-- 顶部导航 -->
		<view class="detail_tab_box" :class="{show: tab_fixed}" :style="{height:navHeight_+'px'}">
			<view :style="{height: iStatusBarHeight + 'px'}"></view>
			<view class="fixed_box">
				<view class="icon-back-box" @click="back()">
					<text class="iconfont icon-xiangzuo"></text>
				</view>
				<view class="detail_tab">
					<view class="tab" @click="tabchk(0)" :class="{active: current == 0}" :style="{'--color': color}">{{ goodsName }}<text></text></view>
					<template v-if='bid == "eYiDtKWz6Qhv_bWnBJ7Knw=="'>
						<view class="tab" @click="tabchk(2)" :class="{active: current == 1}" :style="{'--color': color}">评价<text></text></view>
						<view class="tab" @click="tabchk(5)" :class="{active: current == 3}" :style="{'--color': color}">详情<text></text></view>
						<view class="tab" @click="tabchk(6)" :class="{active: current == 4}" :style="{'--color': color}">推荐<text></text></view>
						
						<!-- <view class="tab" @click="tabchk(1)" :class="{active: current == 1}" :style="{'--color': color}">评价<text></text></view>
						<view class="tab" @click="tabchk(3)" :class="{active: current == 3}" :style="{'--color': color}">详情<text></text></view>
						<view class="tab" @click="tabchk(4)" :class="{active: current == 4}" :style="{'--color': color}">推荐<text></text></view> -->
						<!-- <view class="tab" @click="tabchk(1)" :class="{active: current == 1}" :style="{'--color': color}">详情<text></text></view>
						<view class="tab" @click="tabchk(3)" :class="{active: current == 3}" :style="{'--color': color}">师资<text></text></view>
						<view class="tab" @click="tabchk(4)" :class="{active: current == 4}" :style="{'--color': color}">实景<text></text></view> -->
					</template>
					<template v-else>
						<view class="tab" @click="tabchk(2)" :class="{active: current == 2}" :style="{'--color': color}">评价<text></text></view>
						<view class="tab" @click="tabchk(5)" :class="{active: current == 5}" :style="{'--color': color}">详情<text></text></view>
						<view class="tab" @click="tabchk(6)" :class="{active: current == 6}" :style="{'--color': color}">推荐<text></text></view>
					</template>
				</view>
				<view class="menuButton" :style="{width: menuButtonObject.width+'px'}"></view>
			</view>
		</view>
		<!-- 分享 -->
		<view>
			<view class="shareBox" v-show='!showShare' @click="showShare = true" style="z-index: 26;">
				<image :src="staticUrl+'/images/cat.gif'" mode=""></image>
			</view>
		
		</view>
		
		<view class="goods_info">
			<view id="view0">
				<!-- 图片轮播 -->
				<view class="goods_swiper">
					<view class="goods_v_btn" @click="videoIsShow=!videoIsShow" v-if='pageData.goods_video'>
						<image :src="staticUrl+'/images/play_ico1.png'" class="play_video" mode="aspectFit"></image>
						<!-- <text class="video_time">00'00"</text> -->
					</view>
					<view class="goods_video" v-show="videoIsShow">
						<video id="goods_video"
						:autoplay='false'
						 webkit-playsinline="true"
						 x5-video-player-type="h5-page" 
						 x5-video-player-fullscreen="true" 
						 playsinline 
						 preload="auto"
						 :show-fullscreen-btn='false'
						 :controls="false"
						 :src="pageData.goods_video"></video>
						<view class="cross_btn close_goods_video" @click="videoIsShow=!videoIsShow" :style="{'margin-top':navHeight+'px'}">
							<image :src="staticUrl+'/images/cross_ico.png'" class="cross_btn_video" mode="aspectFit"></image>
						</view>
					</view>
					<view class="goods_swiper_list swiper-container" v-show="!videoIsShow">
						<view class="swiper-pagination pagination goods_swiper_pagination" v-if="pageData.goods_photo">{{positions}} /{{pageData.goods_photo.length}}</view>
						<swiper class="swiper__main" autoplay="true" circular="true" interval="3000" duration="500" @change="numFunc">
							<block v-for="(item,index) in pageData.goods_photo" :key="index">
								<swiper-item class="swiper__cell">
									<image class="swiper__img" @click="previewimages(index,pageData.goods_photo)" :data-index='index' @error="item = ''"
									 :src="item?imgUrl+item:staticUrl+'/images/imageLoading.png'" mode="aspectFill"></image>
								</swiper-item>
							</block>
						</swiper>
						<template v-if='orderList && orderList.length > 0 && showTimer'>
							<view class="flex-box align-center buy-success">
								<image :src="orderList[orderIndex].v_headimg?orderList[orderIndex].v_headimg:staticUrl+'/images/jh_up/head.jpg'" class="avatar" mode="aspectFill"></image>
								<text class="lines">{{ orderList[orderIndex].v_name }}</text>
							</view>
						</template>
					</view>
				</view>
				
				
				<!-- 倒计时 -->
				<!-- <block v-if="pageData.goods_type != 0"> -->
					<view v-if='pageData.show_time == 1'>
						<!--show_time:1 要显示时间和判断活动的开始结束   goods_state：活动状态 2未开始 1进行中 0已结束-->
						<view class="my-timer-box flex-box" v-if='pageData.goods_state == 1 || pageData.goods_state == 2'>
							<view class="left-box flex">
								<view>
									<view class="flex-box align-center">
										<!-- <text v-if='pageData.goods_type == 2'>团购</text>
										<text class="speTag" v-if='pageData.goods_type == 1'>特价</text> -->
										<!-- <text>秒杀价格</text> -->
										<text class="myPrice" v-if="pageData.goods_type == 2">{{pageData.goods_fopen_group_pricee?pageData.goods_fopen_group_pricee:'0.00'}}</text>
										<text class="myPrice" v-if="pageData.goods_type == 1">{{pageData.goods_price?pageData.goods_price:'0.00'}}</text>
										<text class="tag_">{{ pageData.price_description?pageData.price_description:'限时优惠' }}</text>
									</view>
									<view class="restrict_buy">
										<text>仅剩{{pageData.stock?pageData.stock:0}}{{pageData.unit}}</text>
										<template v-if='pageData.restrict_buy_num && pageData.restrict_buy_num!=0'>
											<text>|</text>
											<text>限购{{pageData.restrict_buy_num}}{{pageData.unit}}</text>
										</template>
									</view>
								</view>
							</view>
							<view class="right-box">
								<view  v-if='pageData.goods_state == 1'>
									<view class="right-box-title">距离活动结束还剩</view>
									<view class="right-box-time ">
										<count-down txtColor='#ffffff' bg='rgba(0,0,0,0.2)' fontSize='30' endTxt='本场' :time="parseInt(pageData.goods_end_time)"></count-down>
									</view>
								</view>
								<view  v-if='pageData.goods_state == 2'>
									<view class="right-box-title">距离活动开始还有</view>
									<view class="right-box-time ">
										<count-down txtColor='#ffffff' bg='rgba(0,0,0,0.2)' fontSize='30' endTxt='本场' :time="parseInt(pageData.goods_start_time)"></count-down>
									</view>
								</view>
							</view>
						</view>
						<!-- <view v-if="pageData.goods_state == 0">活动已结束</view> -->
					</view>
				<!-- </block> -->
			
				<!-- 标题、价格 -->
				<view class="goods_text_info">
					<view class="Rebate" v-if="pageData.profitTitle && showRebate">
						<view class="thmeBg t flex-box align-center" :style="{'--color': color}">
							<text>{{pageData.profitTitle}}</text>
							<text class="iconfont icon-guanbi thmeBg" :style="{'--color': color}" @click="showRebate = false"></text>
						</view>
						<view class="tri thmeBg" :style="{'--color': color}"></view>
					</view>
					<view class="goods_text_price flex-box align-center">
						<view class="pageData_goods_name_" v-if='pageData.show_time == 1 && pageData.goods_state != 0'>
							<text class="speTag" v-if='pageData.goods_type == 2'>团购</text>
							<text class="speTag" v-if='pageData.goods_type == 1'>特价</text>
							<template v-if='pageData.goods_name'>
								{{pageData.goods_name}}
							</template>
						</view>
						<template v-else>
							<text class="price2_num myPrice">{{pageData.goods_price?pageData.goods_price:'0.00'}}</text>
							<view>
								<text v-if='parseFloat(pageData.goods_full_price) != parseFloat(pageData.goods_price)'>
									{{pageData.goods_full_price_name}}{{pageData.goods_full_price}}
								</text>
							</view>
							<text v-if='pageData.price_description && bid=="eYiDtKWz6Qhv_bWnBJ7Knw=="' class="ytx_price_description">
								{{ pageData.price_description }}
							</text>
						</template>
						
						
						<!--  分享 / 收藏 -->
						<view class="flex"></view>
						<view class="collect-box flex-box">
							<view class="collect" @click="goodsCollect">
								<text v-if='pageData.goods_collect == 1' class="iconfont icon-01"></text>
								<text v-else class="iconfont icon-02"></text>
								<view class="rtxt">{{pageData.goods_collect == 1?'已收藏':'收藏'}}</view>
							</view>
							<view class="share-box" @click="toOrderList('share')">
								<text class="iconfont icon-fenxiang1"></text>
								<view class="rtxt">分享</view>
							</view>
						</view>
					</view>
					
					
					
					<view class="price_description" v-if='pageData.price_description && bid!="eYiDtKWz6Qhv_bWnBJ7Knw=="'>
						<text>
							{{ pageData.price_description }}
							<text class="bg"></text>
						</text>
					</view>
					
					<view v-if='pageData.express' style="padding: 0 20rpx 10rpx;color: #999999">
						运费：{{parseFloat(pageData.express)>0?pageData.express:'免运费'}}
					</view>
					
					<view class="pageData_goods_name" v-if='pageData.show_time != 1 || (pageData.show_time == 1 && pageData.goods_state == 0)'>
						<text class="speTag" v-if='pageData.goods_type == 2'>团购</text>
						<text class="speTag" v-if='pageData.goods_type == 1'>特价</text>
						<template v-if='pageData.goods_name'>
							{{pageData.goods_name}}
						</template>
					</view>
				</view>
	
	
	
			
				<!-- 销售数据 -->
				<view class="flex-box align-center sale-box">
					<view>
						<text class="txt">已售：</text>
						<text class="num">{{pageData.goods_sales_number?pageData.goods_sales_number:0}}</text>
					</view>
					<text class="li"></text>
					<view>
						<text class="txt">热度：</text>
						<text class="num">{{pageData.goods_heat?pageData.goods_heat:'0'}}</text>
					</view>
					<text class="li"></text>
					<view>
						<text class="txt">好评：</text>
						<text class="num">{{pageData.goods_favorable?pageData.goods_favorable:'0'}}%</text>
					</view>
				</view>




				<!-- 摘要 -->
				<view class="pageData_goods_info" v-if='pageData.goods_info'>{{pageData.goods_info}}</view>




				<!-- 参团列表哦 -->
				<template v-if='pageData.groupData && pageData.goods_type == 2'>
					<Join :groupData='pageData.groupData'></Join>
				</template>
			</view>
			
			
			<!-- 刁钻的壹同学非要放在这上面···· -->
			<view id="view1">
			
				
				 <template v-if='bid == "eYiDtKWz6Qhv_bWnBJ7Knw=="'>   <!-- 壹同学的bid -->
					<view class="goods_detail">
						<view class="mid_title" v-if='pageData.goods_content'>
							<text>{{ goodsName }}介绍</text>
							<text class="bline toRight" :style="{'--color': color,'--color_aid': color_aid}"></text>
						</view>
						<mp-html :content="pageData.goods_content" lazy-load scroll-table selectable use-anchor show-with-animation @load='getViewTop' @ready='getViewTop'/>
					</view>
				</template>

				
			</view>
			
			<!-- 最新评价 -->
			<view id="view2">
				<view class="store-useful" v-if='commentData.comment_labels'>
					<view class="title">按分类看评价</view>
					<view class="comment-tags">
						<text @click="toUrl('/commentPage/comment/commentList?gid='+goodsid+'&label='+lab.id)" v-for="(lab,l) in commentData.comment_labels" :key='l'>{{ lab.title }}({{ lab.num }})</text>
					</view>
					<view class="flex-box align-center level-box" v-if="commentData.comment_level">
						<view class="title">综合</view>
						<view class="comment-tags">
							<text @click="toUrl('/commentPage/comment/commentList?gid='+goodsid+'&level='+lab.comment_level)" v-for="(lab,l) in commentData.comment_level" :key='l'>
								<template v-if='lab.comment_level == 0'>优质({{ lab.num }})</template>
								<template v-if='lab.comment_level == 1'>良好({{ lab.num }})</template>	
								<template v-if='lab.comment_level == 2'>一般({{ lab.num }})</template>
							</text>
						</view>
					</view>
				</view>
				<view class="pjContent" v-if='pageData'>
					<view class="title flex-box align-center flex-between">
						<view>
							<text class="txt">{{ goodsName?goodsName:'宝贝' }}评价</text>
							<text class="pjCount" v-if='commentData.count && commentData.count.allcount>0' :class="{MORE:commentData.count.allcount>999}">{{commentData.count.allcount>999?999:commentData.count.allcount}}</text>
						</view>
						<view class="flex-box align-center icon" @click="toUrl('/commentPage/comment/commentList?gid='+goodsid)">
							<text class="num">{{pageData.goods_favorable?pageData.goods_favorable:'0'}}%</text>
							<text class="iconfont icon-xiangyouxiayiye "></text>
						</view>
					</view>
					<view class="commentList" v-if='commentData.data && commentData.data.length > 0'>
						<view class="boxsShadow commentItem" :class="item.comment_receive?'radius':'noReplayRadious'" v-for="(item,index) in commentData.data"
						 :key='index'>
							<view class="flex-box align-center">
								<image @error="item.v_headimg=''" :src="item.v_headimg?item.v_headimg:staticUrl+ '/images/jh_up/head.jpg'"
								 class="userHead"></image>
								<text class="userName ">{{item.v_name}}</text>
								<text class="userLevel iconfont icon-vip thmeColor" :style="{'--color': color}"></text>
							</view>
							<view class="commentContent">
								<view class="flex-between flex-box align-center">
									<view class="starBox">
										<block v-for="i in 5" :key='i'>
											<text class="iconfont icon-xingxing1"></text>
										</block>
										<view class="starMask" :style="{width: parseFloat(item.star)/5*100+'%'}">
											<block v-for="i in 5" :key='i'>
												<text class="iconfont icon-xingxing"></text>
											</block>
										</view>
									</view>
									<text class="time">{{item.created_at}}</text>
								</view>
								<view class="usercmt">{{item.comment_word}}</view>
								<view class="comment-tags" v-if='item.comment_label'>
									<text v-for="(lab,l) in item.comment_label" :key='l'>{{ lab }}</text>
								</view>
								<ImgLayOut v-if='item.comment_pic && item.comment_pic[0]' :imgData='item.comment_pic'></ImgLayOut>
								<!-- <view class="goodsName">{{item.goods_name}}</view> -->
							</view>
							<view class="storeReplay relative" v-if='item.comment_receive'>
								<view class="thmeBg" :style="{'--color': color}"></view>
								<view class="flex-box flex-between align-center">
									<text class="thmeColor replayS" :style="{'--color': color}">商家回复：</text>
									<text class="thmeColor replayT" :style="{'--color': color}">{{item.updated_at}}</text>
								</view>
								<view class="replayTxt thmeColor" :style="{'--color': color}">
									{{item.comment_receive}}
								</view>
							</view>
							<view class="noReplay relative" v-if='!item.comment_receive'>
								<view class="thmeBg" :style="{'--color': color}"></view>
							</view>
						</view>
						<view v-if='commentData.data.length > 2' class="more thmeBorder thmeColor" :style="{'--color': color}" @click="toUrl('/commentPage/comment/commentList?gid='+goodsid)">查看全部评价</view>
					</view>
					<view v-else class="noPJ">
						该{{ goodsName?goodsName:'宝贝' }}还没有任何评价
					</view>
				</view>
			
			
			
			
			<!-- 适用门店/关联门店 -->
				<view class="store-useful" v-if='pageData.relevanceStore'>
					<view class="flex-box flex-between" @click="showUsefullStore=true">
						<view class="title">校区分布</view>
						<view>
							<text class="txt">共{{pageData.relevanceStore.length}}家</text>
							<text class="iconfont icon-xiangyouxiayiye"></text>
						</view>
					</view>
					<view class="mask" v-if='showUsefullStore' @click="showUsefullStore = false">
						<view class="store-useful-list flex-box" @click.stop>
							<view class="title">
								<text class="iconfont icon-store"></text>
								适用{{storeName}}
							</view>
							<view class="list">
								<view class="goods_store" v-for="(item,index) in pageData.relevanceStore" :key='index' @click='toUrl("/pages/store/storeIndex?shop_id=" + item.shop_id)'>
									<image :src="imgUrl+item.logo" mode="aspectFit" class="goods_store_thumb boxsShadow"></image>
									<view class="flex">
										<view class="storeName">
											{{item.name}}
										</view>
										<view class="lines">{{item.address}}</view>
									</view>
									<text class="iconfont icon-xiangyouxiayiye"></text>
								</view>
							</view>
						</view>
					</view>
				</view>
			
			
			
			
			
			<!-- 店铺 -->
				<view class="goods_store_box" v-if='pageData.store_id && pageData.store_id != 0'>
					<view class="goods_store" @click='toUrl("/pages/store/storeIndex?shop_id=" + pageData.store_id)'>
						<image @error='pageData.shop_logo=""' :src="pageData.shop_logo?imgUrl+pageData.shop_logo:staticUrl+'/images/imageLoading.png'" mode="aspectFit" class="goods_store_thumb boxsShadow"></image>
						<view class="flex">
							<view class="storeName">
								{{pageData.shopName?pageData.shopName:'--'}}
							</view>
						<!-- 	<view class="lines storeType" v-if='bid=="eYiDtKWz6Qhv_bWnBJ7Knw=="' @click.stop="call">
								<text class="iconfont icon-dianhua"></text>
								<text class="tel">{{pageData.shopMobile}} {{pageData.telExtension}}</text>
							</view> -->
							<view class="goods_store_info">
								<view class="g_s_info_item">
									<view class="g_s_i_t">已售</view>
									<view class="g_s_i_num">{{pageData.sales_number?pageData.sales_number:0}}</view>
								</view>
								<view class="g_s_info_item">
									<view class="g_s_i_t">热度</view>
									<view class="g_s_i_num">{{pageData.heat?pageData.heat:'0'}}</view>
								</view>
								<view class="g_s_info_item comment">
									<view class="g_s_i_t">好评</view>
									<view class="g_s_i_num">{{pageData.favorable?pageData.favorable:'0'}}%</view>
								</view>
							</view>
						</view>
						<text class="iconfont icon-xiangyouxiayiye"></text>
					</view>
					<view class="goods_store_btns flex-box flex-center">
						<view v-if='bid=="eYiDtKWz6Qhv_bWnBJ7Knw=="' class="goods_store_btn flex-box align-center" @click='call'>
							<text class="iconfont icon-dianhua"></text>
							<text>电话咨询</text>
						</view>
						<view v-else class="goods_store_btn flex-box">
							<view class="flex-box align-center" @click="contact">
								<text class="iconfont icon-conversation_icon"></text>
								<text>联系客服</text>
							</view>
							<!-- #ifdef MP-WEIXIN -->
							<button open-type="contact" bindcontact="handleContact" class="btn-contact" v-if='service_state != 1'></button>
							<!-- #endif -->
						</view>
						<view class="goods_store_btn flex-box align-center" @click='toUrl("/pages/store/storeIndex?shop_id=" + pageData.store_id)'>
							<text class="iconfont icon-store"></text>
							<text v-if='bid=="eYiDtKWz6Qhv_bWnBJ7Knw=="'>进校逛逛</text>
							<text v-else>进店逛逛</text>
						</view>
					</view>
				</view>
			</view>
			
			
			
			<!-- 教学实景 -->
			<view id="view4">
				<view class="goods_detail" v-if='pageData.description3'>
					<view class="mid_title">
						<text>{{ pageData.description3Title }}</text>
						<text class="bline toRight" :style="{'--color': color,'--color_aid': color_aid}"></text>
					</view>
					<mp-html :content="pageData.description3" lazy-load scroll-table selectable use-anchor show-with-animation @load='getViewTop' @ready='getViewTop'/>
				</view>
			</view>
			
			<!-- 详情 -->
			<view id="view5">
				<template v-if='bid != "eYiDtKWz6Qhv_bWnBJ7Knw=="'>
					<view class="goods_detail">
						<view class="mid_title" v-if='pageData.goods_content'>
							<text>{{ goodsName }}详情</text>
							<text class="bline toRight" :style="{'--color': color,'--color_aid': color_aid}"></text>
						</view>
						<mp-html :content="pageData.goods_content" lazy-load scroll-table selectable use-anchor show-with-animation @load='getViewTop' @ready='getViewTop'/>
					</view>
				</template>
			</view>
			
			
			
			<!-- 师资介绍详情 -->
			<view id="view3">
				<view class="goods_detail" v-if='pageData.description2'>
					<view class="mid_title">
						<text>{{ pageData.description2Title }}</text>
						<text class="bline toRight" :style="{'--color': color,'--color_aid': color_aid}"></text>
					</view>
					<mp-html :content="pageData.description2" lazy-load scroll-table selectable use-anchor show-with-animation @load='getViewTop' @ready='getViewTop'/>
				</view>
			</view>
			<!--  购物须知 版本2.0 -->
			<view id="view6">
				<!-- 购物须知 版本 1.0-->
				 <template v-if='bid != "eYiDtKWz6Qhv_bWnBJ7Knw=="'> 
					<view class="store-useful" v-if='pageData.instructions'>
						<view class="flex-box flex-between" @click="showTips=true">
							<view class="title">{{pageData.instructionsTitle?pageData.instructionsTitle:'购物须知'}}</view>
							<text class="iconfont icon-xiangyouxiayiye"></text>
						</view>
						<view class="mask" v-if='showTips' @click="showTips = false">
							<view class="store-useful-list flex-box">
								<view class="Tips" @click.stop>
									<mp-html :content="pageData.instructions" lazy-load scroll-table selectable use-anchor show-with-animation @load='getViewTop' @ready='getViewTop'/>
								</view>
							</view>
						</view>
					</view>
				</template>
		   <!--  购物须知 版本2.0 -->
				 <template v-if='bid == "eYiDtKWz6Qhv_bWnBJ7Knw=="'>  <!-- 壹同学的bid-->
					<view class="goods_detail">
						<view class="mid_title" v-if='pageData.instructions'>
							<text>{{pageData.instructionsTitle?pageData.instructionsTitle:'购物须知'}}</text>
							<text class="bline toRight" :style="{'--color': color,'--color_aid': color_aid}"></text>
						</view>
						<mp-html :content="pageData.instructions" lazy-load scroll-table selectable use-anchor show-with-animation @load='getViewTop' @ready='getViewTop'/>
					</view>
				</template>
			</view>
			
			<!-- 推荐商品 -->
			<view class="detail_recommend_box" v-if='likeList && likeList.length > 0'>
				<view class="mid_title">
					<text>{{ goodsName }}推荐</text>
					<text class="bline toRight" :style="{'--color': color,'--color_aid': color_aid}"></text>
				</view>
				<view class="detail_recommend flex-box">
					<block v-for="(item,i) in likeList" :key='i'>
						<view class="detail_recommend_goods" @click="toGoods(item.goods_id)">
							<view class="boxsShadow item">
								<image @error="item.img=''" :src="item.img?imgUrl+item.img:staticUrl+'/images/imageLoading.png'" mode="aspectFill"></image>
								<view class="lines2 detail_recommend_goods_name">
									{{item.name}}
								</view>
								<view class="profitTitle_ lines" style="padding-left: 4rpx;" v-if='item.profitTitle'>
									<text>{{ item.profitTitle }}</text>
								</view>
								<view class="detail_recommend_goods_price myPrice">{{item.price}}</view>
							</view>
						</view>
					</block>
				</view>
			</view>
			
			<view class="footer_btn_box" v-if="pageData.act_join_act == 1">
				<navigator url="/activityPage/join/i_join" class="btn2">我要加入</navigator>
			</view>
		</view>

		<!-- 底部信息 start -->
		<view class="footer_info">
			<view class="ftr_info_list">
				<navigator v-if='pageData.store_id != 0' :url="'/pages/store/storeIndex?shop_id='+pageData.store_id" class="ftr_info_item">
					<view class="ftr_info_ico">
						<text class="iconfont icon-store thmeColor" :style="{'--color': color}"></text>
					</view>
					<view class="ftr_info_t">{{ storeName?storeName:'店铺' }}</view>
				</navigator>
				<view v-else class="ftr_info_item info" @click="backHome">
					<view class="ftr_info_ico">
						<text class="iconfont icon-withdraw"></text>
					</view>
					<view class="ftr_info_t">返回首页</view>
				</view>

				<view class="ftr_info_item serve" style="position: relative;">
					<view @click="contact">
						<view class="ftr_info_ico">
							<text class="iconfont icon-conversation_icon"></text>
						</view>
						<view class="ftr_info_t">客服</view>
					</view>
					<!-- #ifdef MP-WEIXIN -->
					<button open-type="contact" v-if='service_state != 1' bindcontact="handleContact" class="btn-contact"></button>
					<!-- #endif -->
				</view>
				<!-- <view @click="toOrderList('/pages/index/orderList')" class="ftr_info_item order">
					<view class="ftr_info_ico">
						<text class="iconfont icon-dingdan"></text>
					</view>
					<view class="ftr_info_t">订单</view>
				</view> -->
				<view @click="toCart" class="ftr_info_item" style="position: relative;">
					<view class="unread" :data-num='carNum' v-if='carNum'></view>
					<view class="ftr_info_ico">
						<text class="iconfont icon-gouwuche"></text>
					</view>
					<view class="ftr_info_t">{{ cartName }}</view>
				</view>
			</view>
			
			
			<!-- 商品已下架 -->
			<view class="ftr_info_oper" v-if='pageData.state == 0'>
				<view class="btnone">
					<text>{{ goodsName?goodsName:'宝贝' }}已下架</text>
				</view>
			</view>
			<!-- 上架中 -->
			<view class="ftr_info_oper" v-else>
				
				<!-- 团购 -->
				<template v-if='pageData.goods_type == 2'>
					<view v-if='(pageData.goods_state == 1 && pageData.show_time == 1) || pageData.show_time == 0' class="ftr_info_oper_item y"
					 @click="viewIsShow(1)" style="border-radius: 34px 0 0 34px;">
						<view class="ftr_info_oper_item_c">
							<view><text class="ftr_info_oper_price_num myPrice">{{pageData.goods_price}}</text></view>
							<view>{{pageData.goods_price_name?pageData.goods_price_name:'立即购买'}}</view>
						</view>
					</view>
					<view v-if='(pageData.goods_state == 1 && pageData.show_time == 1) || pageData.show_time == 0' class="ftr_info_oper_item r"
					 @click="viewIsShow(2)" style="border-radius: 0 34px 34px 0;">
						<view class="ftr_info_oper_item_c">
							<view><text class="ftr_info_oper_price_num myPrice">{{pageData.goods_fopen_group_pricee}}</text></view>
							<view>{{pageData.goods_open_group_price_name?pageData.goods_open_group_price_name:'一键开团'}}</view>
						</view>
					</view>
				</template>
				
				
				<!-- 普通/特价 -->
				<view v-else class="ftr_info_oper_item r oBtn" style="padding: 0;border-radius: 40px;">
					<!-- 
						join_cart: 允许添加购物车  1允许  2拒绝
						id_number: 购买时 是否需要输入身份证  1需要  2不需要 如果需要  则不能加入购物车
					 -->
					<template v-if='pageData.show_time == 0 || (pageData.show_time == 1 && pageData.goods_state == 1)'>
						<view class="ftr_info_oper_item_c btnBox">
							<view class="addcart" @click="viewIsShow(3)" v-if='pageData.join_cart !=2 && pageData.is_id_number != 1'>加入{{ cartName }}</view>
							<view class='addBuy' @click="viewIsShow(1)">
								<view style="margin-top: 4rpx;"><text class="ftr_info_oper_price_num myPrice">{{pageData.goods_price}}</text></view>
								<view style="font-size: 22rpx;margin-top: -4rpx;">{{pageData.goods_price_name?pageData.goods_price_name:'立即购买'}}</view>
							</view>
						</view>
					</template>
				</view>

				<!-- 活动未开始 -->
				<view v-if='pageData.goods_state == 2 && pageData.show_time == 1' style="background: #ffa04b;" class="btnone">
					<text>活动未开始</text>
				</view>
				<!-- 活动未开始 -->
				<view v-if='pageData.goods_state == 0 && pageData.show_time == 1' class="btnone">
					<text>活动已结束</text>
				</view>
			</view>
		</view>

		<!-- 底部购买信息 start -->
		<view class="ftr_buy_info" v-show="isShow" style="z-index: 33;">
			<view class="cross_btn close_buy_info" @click="viewIsShow">
				<text class="icon-guanbi iconfont" style="color: #999999;"></text>
			</view>
			<view class="ftr_buy_info_goods flex-box">
				<view class="ftr_buy_info_goods_thumb" @click="previewimages(0,pecsMsg.photo)">
					<image :src="pecsMsg.img?imgUrl+pecsMsg.img:imgUrl+pageData.goods_img" mode="aspectFill"></image>
				</view>
				<view class="ftr_buy_info_goods_info flex">
					<view class="goods_titles">
						<text class="tag color3" v-if="clickBtnType == 2">{{pageData.goods_group_number}}人团</text>
						<text>{{pageData.goods_name}}</text>
					</view>
					<view class="ftr_buy_info_goods_price">
						<view>
							<!-- 团购商品有规格时 显示团购价 普通/特价商品显示规格价格 -->
							<text class="price2_num myPrice" v-if='pageData.goods_type == 2 && clickBtnType == 2'>{{pageData.goods_fopen_group_pricee}}</text>
							<text class="price2_num myPrice" v-else>{{pecsMsg.price?pecsMsg.price:pageData.goods_price}}</text>
						</view>
						<!-- <template v-if='clickBtnType == 2'>
							<view v-if='parseFloat(pageData.goods_fopen_group_pricee) != parseFloat(pageData.goods_full_price)'>
								{{pageData.goods_full_price_name?pageData.goods_full_price_name:'原价'}}：
								<text class="myPrice">{{pageData.goods_full_price}}</text>
							</view>
						</template> -->
					</view>
				</view>
			</view>
			<!-- 规格开始 -->
			<view class="specification" v-if='pageData.getGoodsSpecs'>
				<view class="speci-list">
					<view class="speci-item" v-for="(item,index) in specsList" :key='index'>
						<view class="speci-title">{{item.title}}</view>
						<view class="speci-sort-list">
							<view class="speci-sort-item" v-if='item.list' v-for="(item1,index1) in item.list" :key='index1' :class="{
								speciNomal:(item.state!=true && item1.state != true)||(item.state!=false && item1.state == true) ,
								speciActive: (item.state==false && item1.state == true) || (item.state==true && item1.state == 'true_'),
								speciNone: item.state!=false && item1.state == false
							}"
							 @click="specTab(index,index1,item.state,item1.state,item1.specs_id)">
								<text>{{item1.title}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 规格结束 -->
			<view class="ftr_buy_info_oper">
				<view class="ftr_buy_info_oper_h">数量</view>
				<view class="ftr_buy_info_oper_num">
					<view class="ftr_buy_info_oper_btn minus disabled" data-type="minus" @click="minus">
						<image :src="staticUrl+'/images/minus2_ico.png'" :style="v_input < 2?'opacity: 0.4;':'opacity: 1;'" class="minusBottomBox"
						 mode="aspectFit"></image>
					</view>
					<input type="number" v-model="v_input" class="ftr_buy_info_oper_input" />
					<view class="ftr_buy_info_oper_btn plus" data-type="plus" @click="plus">
						<image :src="staticUrl+'/images/plus2_ico.png'" class="minusBottomBox" :style="stockShort?'opacity: 0.4;':'opacity: 1;'"
						 mode="aspectFit"></image>
					</view>
				</view>
			</view>
			<view class="btn3" @click="submitdoods">确定</view>
		</view>

		<!-- 全屏图 start -->
		<view class="full_atlas" v-if="swiperIsShow">
			<view class="cross_btn close_full_atlas" @click="close_swiper">
				<image :src="staticUrl+'/images/cross_ico.png'" class="cross_btn_video" mode="aspectFit"></image>
			</view>
			<view class="full_atlas_swiper">
				<view class="full_atlas_list swiper-container" v-if="pageData.goods_photo">
					<view class="swiper-pagination pagination full_atlas_pagination">{{swiperPositions}} /
						{{pageData.goods_photo.length}}</view>
					<swiper class="swiper__main" autoplay="true" circular="true" interval="3000" duration="500" @change="swiperNumFunc">
						<block v-for="(item,index) in pageData.goods_photo" :key="index">
							<swiper-item class="swiper__cell">
								<image class="swiper__img" :data-index='index' @error="error" :src="item?imgUrl+item:staticUrl+'/images/imageLoading.png'"
								 mode="aspectFill"></image>
							</swiper-item>
						</block>
					</swiper>
				</view>
			</view>
		</view>

		<view class="mask" v-show="isShow" @click="viewIsShow" style="z-index: 30;"></view>
		<!-- 遮罩 end -->
		<showModel @cancelFunc='showModal=false' goHome='0' v-if='showModal' type='2'></showModel>
		<!-- 分享海报 -->
		<SharePoster v-if='showShareQr' :myid='goodsid' type='2' :pageType='"10&gid="+goodsid' @closePoster='showShareQr=false'></SharePoster>
	
		<!-- <showModel :title='title' :msg='msg' :btn1='btn1' :btn2='btn2' :btn1_url="btn1_url"  :btn2_url="btn2_url" :jump='jump'
		@cancelFunc='closeModel'
		@certain='toUrl("/userPage/user/userinfo")' v-if='showModal1' type='99'></showModel> -->
		
		
		<showModeldetail
				    :title='title' 
					:msg='msg' 
					:btn1='btn1' 
					:btn2='btn2' 
					:btn1_url="btn1_url"  
					:btn2_url="btn2_url" 
					:jump='jump' 
					 v-if='showModal2' 
					 type='99'
					 @cancelFunc='closeModel'>
		</showModeldetail>
	</view>
</template>

<script>
	import SharePoster from "../../components/sharePoster.vue"
	import ImgLayOut from "../../components/imgLayOut.vue"
	import Join from "../../components/Join.vue"
	import {mapMutations} from 'vuex'
	var firstIndex /*第一次选择的类别索引*/ , firstIndex1 /*第一次选择的规格索引*/ , len = 0 /*类别的长度*/ ,
		check = [] /*选择规格的ID*/ ;
	var selectOver = false,
		that,timer=null,timeout = null,timeout1 = null; /*选择结束标志 当已经选择完毕全部类别后切换某个选项时为true 此时把该项作为参考类别*/
	export default {
		components: {
			Join,
			ImgLayOut,
			SharePoster
		},
		data() {
			return {
				menuButtonObject: getApp().globalData.menuButtonObject,
				navHeight:getApp().globalData.navHeight,
				color: getApp().globalData.color,
				color_aid: getApp().globalData.color_aid,
				hideCat: getApp().globalData.hideCat, // 是否关闭猫咪
				days: 0,
				hours: 0,
				minutes: 0,
				seconds: 0,
				isShow: false,
				v_input: 1,

				positions: 1,
				swiperPositions: 1,
				videoIsShow: false,
				swiperIsShow: false,
				toTop: false,

				goodsid: '',
				imgUrl: this.imgUrl,
				staticUrl: this.staticUrl,
				pageData: '',
				clickBtnType: 1, // 点击的按钮  1一件购买  2一件开团  3加入购物车

				bid: uni.getStorageSync("bid"),
				vid: uni.getStorageSync("vid"),
				mode: uni.getStorageSync('mode'),
				showShare: false, // 显示分享图标
				showModal: false, // 是否显示模态框
				showShareQr: false, // 展示分享二維碼

				
				specsList: '', // 规格列表
				specsString: '',
				specsSave: [], // 暂存规格最初列表
				selectNum: 0, // 选中的规格数量
				lastIndex: -1, // 上一次选中的规格类别索引
				lastIndex1: -1, // 上一次选中的规格索引
				pecsMsg: '', // 规格商品信息
				specs_bind_id: '', // 选择的规格id
				specs_bind_text: '', // 选择的规格名称
				stockShort: false, // 库存不足

				commentData: '',

				
				likeList: '',
				currGoods: 0,
				carNum: '', // 购物车数量
				swiperLen: 0,
				showUsefullStore:false,
				showRebate: true,
				cartName: getApp().globalData.cartName,
				storeName: uni.getStorageSync('startUp').nameDefinition.storeDefinitionName,
				showTips: false,
				service_state: uni.getStorageSync('startUp').service_state,// 是否开起客服系统
				tab_ctt:1, // 详情tab切换
				goodsName: uni.getStorageSync('startUp').nameDefinition.goodsName,
				fromShare: 0,// 来自分享 1是 0否
				order_id:'',
				orderList: '',
				orderIndex: 0,
				showTimer: true,
				
				tab_fixed: false,
				iStatusBarHeight: 0,
				
				current: 0,
				scrollTop: -1,
				view1Top: 0,
				view2Top: 0,
				view3Top: 0,
				view4Top: 0,
				view5Top: 0,
				view6Top: 0,
				navHeight_: getApp().globalData.navHeight,
				showModal1: false,
				showModal2: false,
				msg:'当前您的信息不完整',
				title:'温馨提示',
				msg:'当前您的信息不完整',
				btn1:'稍后完善',
				btn2:'去完善',
				btn1_url:'',
				btn2_url:'',
				jump:'',
				
			}
		},
		onLoad(e) {
			that = this
			that.goodsid = e.goodsid;
			if (e.goods_id) { 
				that.goodsid = e.goods_id;
			}
			if (e.fromShare) {
				that.fromShare = e.fromShare
			}
			if (e.share_v_id) {
				uni.setStorage({
					key: "share_v_id",
					data: e.share_v_id
				})
			}
			if(that.navHeight_ == 0){
				that.navHeight_ = 50
			}
			that.getPageData();
			that.getCart();
			setTimeout(()=>{
				that.showRebate = false
			},5000)
			that.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight
		},
		onReady() {
			that = this
			this.$nextTick(function(){
				that.getViewTop()
			})
		},
		onPageScroll(e) {
			console.log(e);
			if (e.scrollTop > 100) {
				that.toTop = true
				that.tab_fixed = true
				if (that.hideCat != true) {
					that.showShare = false
				}
			} else {
				that.tab_fixed = false
				that.toTop = false
				that.showShare = true
			}
			if(e.scrollTop < that.view1Top){
				that.current = 0
			}
			
			if(that.bid == "eYiDtKWz6Qhv_bWnBJ7Knw=="){
				if(e.scrollTop >= that.view1Top){
					that.current = 1
				}
				if(e.scrollTop >= that.view3Top){
					that.current = 3
				}
				if(e.scrollTop >= that.view4Top){
					that.current = 4
				}
			}else{
				if(e.scrollTop >= that.view2Top){
					that.current = 2
				}
				if(e.scrollTop >= that.view5Top){
					that.current = 5
				}
				if(e.scrollTop >= that.view6Top){
					that.current = 6
				}
			}
		},
		onUnload(){
			clearInterval(timer)
			clearTimeout(timeout)
			clearTimeout(timeout1)
		},
		methods: {
			...mapMutations(['setTab']),
			closeModel(){
				that.showModal1 = false;
				that.showModal2 = false;
				that.getPageData()
			},
			tabchk(i){
				if(i == 0){
					uni.pageScrollTo({duration: 100,scrollTop: 0})
				}
				if(i == 1){
					uni.pageScrollTo({duration: 100,scrollTop: that.view1Top})
				}
				if(i == 2){
					uni.pageScrollTo({duration: 100,scrollTop: that.view2Top})
				}
				if(i == 3){
					uni.pageScrollTo({duration: 100,scrollTop: that.view3Top})
				}
				if(i == 4){
					uni.pageScrollTo({duration: 100,scrollTop: that.view4Top})
				}
				if(i == 5){
					uni.pageScrollTo({duration: 100,scrollTop: that.view5Top})
				}
				if(i == 6){
					uni.pageScrollTo({duration: 100,scrollTop: that.view6Top})
				}
			},
			getViewTop(){ // 避免反复获取
				clearTimeout(timeout)
				clearTimeout(timeout1)
				let that = this,h1=0,h2=0,h3=0,h4=0,h5=0,h6=0;
				// uni.createSelectorQuery().in(this).select(".detail_tab_box").boundingClientRect(function(data) {
					uni.createSelectorQuery().in(this).select("#view0").boundingClientRect(function(data) {
						h1 = data.height
					}).exec()
					uni.createSelectorQuery().in(this).select("#view1").boundingClientRect(function(data) {
						h2 = data.height
					}).exec()
					uni.createSelectorQuery().in(this).select("#view2").boundingClientRect(function(data) {
						h3 = data.height
					}).exec()
					uni.createSelectorQuery().in(this).select("#view3").boundingClientRect(function(data) {
						h4 = data.height
					}).exec()
					uni.createSelectorQuery().in(this).select("#view4").boundingClientRect(function(data) {
						h5 = data.height
					}).exec()
					uni.createSelectorQuery().in(this).select("#view5").boundingClientRect(function(data) {
						h6 = data.height
					}).exec()
					timeout1 = setTimeout(()=>{
						that.$nextTick(function(){
							that.view1Top = h1 - that.navHeight_
							that.view2Top = that.view1Top + h2
							that.view3Top = that.view2Top + h3 
							that.view4Top = that.view3Top + h4
							that.view5Top = that.view4Top + h5
							that.view6Top = that.view5Top + h6
						})
						if(that.view6Top - that.view1Top < 200){ // 避免渲染未结束就获取到值
							timeout = setTimeout(()=>{
								that.getViewTop()
							},1500)
						}
						console.log(that.view1Top,that.view2Top,that.view3Top,that.view4Top,that.view5Top,that.view6Top)
					},99)
				// }).exec()
			},
			change(e) {
				this.currGoods = e.detail.current;
			},
			getUlike() { // 猜你喜欢
				that.$http.post({
					url: '/singleSaleApi/guessLikeGoods',
					data: {
						v_id: uni.getStorageSync("vid"),
						bid: that.bid,
						goods_id: that.goodsid
					}
				}).then(res => {
					if (res.data) {
						that.likeList = res.data;
						that.swiperLen = Math.floor(that.likeList.length/6)
					}
				})
			},
			getComment() {
				that.$http.get({
					url: '/singleSaleApi/get_comment',
					data: {
						bid: that.bid,
						goods_id: that.goodsid, // 53,
						page: 1,
						pageNum: 3
					}
				}).then(res => {
					if(res.errcode == 100){
						that.commentData = res
					}
				})
			},
			getCart() { // 7、获取购物车数据
				var vid = uni.getStorageSync('vid');
				that.$http.post({
					url: '/zzj_singleSaleApi/cartList',
					data: {
						v_id: vid,
						bid: that.bid
					}
				}).then(res => {
					if (res.data) {
						that.carNum = res.data.length;
					}
				})
			},
			error(e1) {
				var index = parseInt(e1.target.dataset.index);
				var type = e1.target.dataset.type;
				this.pageData.goods_photo[index] = ''
				this.pageData.goods_photo = [].concat(this.pageData.goods_photo)
			},
			specTab(index, index1, itemState, item1State, id) { // 规格类别索引 规格索引  类别状态 规格状态
				/**
				 * selectNum  选中的规格数量
				 * lastIndex/firstIndex  上一次/第一次选中的类别索引
				 * lastIndex1/firstIndex1  上一次/第一次选中的规格索引
				 * **/
				// console.log(index,index1,itemState,item1State,id,this.selectNum)
				var arr = this.specsSave;
				if (typeof check == 'string')
					check = check.split(',')
				if (itemState != true) { // 第一次选择 后面以这次选择为参考显示高不高亮
					if (itemState == false && item1State == true) { // 取消选择
						this.selectNum = this.selectNum > 1 ? this.selectNum -= 1 : 0;
						check[index] = -1;
						this.lastIndex = -1;
						firstIndex = '';
						firstIndex1 = '';
						this.specsList = arr;
					} else { // 选中某项
						if (this.lastIndex != index)
							this.selectNum = 1;
						this.lastIndex = index;
						check = [];
						check[index] = parseInt(id);
						var array = JSON.parse(this.specsString)
						array[index].list[index1].clickingState[index].list[index1].state = true;
						array[index].list[index1].clickingState[index].select = true; // 标记已选
						this.specsList = array[index].list[index1].clickingState
						firstIndex = index;
						firstIndex1 = index1;
						selectOver = false
					}
				}
				if (itemState == true) { // 选择了其他类别的想
					if (item1State == false) // 不可选项
						return
					var array = JSON.parse(this.specsString);
					if (item1State == true) { // 选中某项
						if (this.lastIndex != index) // 不同类别选中才加1 同类别不加
							this.selectNum = this.selectNum < len ? this.selectNum += 1 : len;
						if (this.selectNum != len)
							this.specsList[index].list = array[firstIndex].list[firstIndex1].clickingState[index].list
						check[index] = parseInt(id);
						this.specsList[index].select = true; // 标记已选
						// 求交集
						if (this.selectNum > 1) {
							if (this.selectNum < len) { //没选完
								this.specsList[index].list[index1].state = 'true_';
								this.specsList.forEach((item, i) => {
									if (item.select != true) { // 未选的类别
										var arr = array[index].list[index1].clickingState[i].list;
										item.list = array[firstIndex].list[firstIndex1].clickingState[i].list.slice(0);
										item.list.forEach((item_, i_) => {
											if (item_.state != arr[i_].state) { // 判断是否都为可选状态
												item_.state = false
											}
											if (item_.state == 'true_' || item_.state == true) {
												item_.state = false; // 先全部默认不可选 再去寻找可选项
												var temChk = check.slice(0);
												temChk.push(parseInt(item_.specs_id))
												temChk = temChk.sort((a, b) => {
													return a - b;
												}).join(',')
												this.pageData.getGoodsSpecs.specsPrice.forEach((item2) => {
													if (temChk.indexOf(item2.specs_ids) > -1) { // 第三层通过价格表寻找是否存在该规格
														item_.state = true;
													}
												})
											}
										})
									}
								})
							} else {
								// 选完了
								if (selectOver) {
									if (this.lastIndex == index) {
										this.specsList[index].list[index1].state = 'true_';
										this.specsList.forEach((item, i) => {
											if (i == index) {
												item.list.forEach((item_, i_) => {
													if (item_.state == 'true_')
														item_.state = true;
													if (i_ == index1)
														item_.state = item_.state == 'true_' ? true : 'true_'
												})
											}
										})
										selectOver = true
									} else {
										this.selectNum = 1;
										this.lastIndex = index;
										check = [];
										check[index] = parseInt(id);
										var array = JSON.parse(this.specsString)
										array[index].list[index1].clickingState[index].list[index1].state = true;
										array[index].list[index1].clickingState[index].select = true; // 标记已选
										this.specsList = array[index].list[index1].clickingState
										firstIndex = index;
										firstIndex1 = index1;
										selectOver = false
									}
								} else {
									this.specsList[index].list[index1].state = 'true_';
									this.specsList.forEach((item, i) => {
										if (i == index) {
											item.list.forEach((item_, i_) => {
												if (item_.state == 'true_')
													item_.state = true;
												if (i_ == index1)
													item_.state = item_.state == 'true_' ? true : 'true_'
											})
										}
									})
									selectOver = true
								}
							}
						}
					}
					this.lastIndex = index;
					if (item1State == 'true_') { // 取消选择
						this.selectNum = this.selectNum > 1 ? this.selectNum -= 1 : 0;
						check[index] = -1;
						this.lastIndex = -1;
						this.specsList[index].select = false; // 取消已选标记
						this.specsList[index].list[index1].state = true;
						if (this.selectNum == 1) {
							var array = JSON.parse(this.specsString)
							array[firstIndex].list[firstIndex1].clickingState[firstIndex].list[firstIndex1].state = true;
							array[firstIndex].list[firstIndex1].clickingState[firstIndex].select = true; // 标记已选
							this.specsList = array[firstIndex].list[firstIndex1].clickingState
						}
						selectOver = false;
					}
					this.lastIndex1 = index1;
				}
				if (this.selectNum == len) { // 选完了
					check = check.sort((a, b) => {
						return a - b;
					}).join(',')
					this.pageData.getGoodsSpecs.specsPrice.forEach((item) => {
						if (item.specs_ids == check) { // 找到对应规格的商品信息
							this.pecsMsg = item;
							this.specs_bind_id = item.id; // 选择的规格id	
							this.specs_bind_text = item.specs_title; // 选择的规格名称
						}
					})
				} else {
					this.pecsMsg = '';
					this.specs_bind_id = ''; // 选择的规格id
					this.specs_bind_text = ''; // 选择的规格名称
				}
				// console.log("当前选择的规格数："+this.selectNum)
			},
			previewimages: function(i, imgArry) {
				if (imgArry) {
					let imageUrls = [];
					for (let ind in imgArry) {
						imageUrls.push(this.imgUrl + imgArry[ind])
					}
					uni.previewImage({
						current: i,
						urls: imageUrls,
						indicator: "number",
						loop: true
					})
				}
			},
			toCart(url){
				var vid = uni.getStorageSync('vid');
				if(vid && vid != 0){
					that.setTab(4);
					uni.setStorageSync('tab',4)
					uni.reLaunch({
						url: '/pages/tabbar/tabbar'
					})
				}else{
					that.showModal = true;
				}
			},
			toOrderList: function(url) {
				var vid = uni.getStorageSync('vid');
				if (url == 'share') {
					// #ifdef MP-TOUTIAO
					return
					// #endif
					var mode = uni.getStorageSync('mode');
					if (mode != 0) { // 分销模式
						if (!vid || vid == 0) {
							that.showModal = true;
							return
						}
					}
					that.showShareQr = true;
					return
				}
				if (!vid) {
					that.showModal = true;
				} else {
					uni.navigateTo({
						url: url
					})
				}
			},
			close_video: function() {
				// #ifdef H5
				uni.navigateTo({
					url: '../video/video?goodsid=' + this.goodsid
				})
				// #endif
				// #ifdef MP-TOUTIAO || MP-WEIXIN
				that.videoIsShow = true
				// #endif
			},
			close_swiper: function() {
				this.swiperIsShow = !this.swiperIsShow
			},
			numFunc: function(e) {
				this.positions = parseInt(e.detail.current) + 1;
			},
			swiperNumFunc: function(e) {
				this.swiperPositions = parseInt(e.detail.current) + 1;
			},
			minus: function() {
				//減少數量
				this.stockShort = false;
				if (parseFloat(this.v_input) > 1) {
					this.v_input = parseInt(this.v_input) - 1;
				} else {
					uni.showToast({
						icon: 'none',
						title: '数量不能少于1哦~'
					})
				}
			},
			plus: function() {
				var num = this.pecsMsg.stock ? parseFloat(this.pecsMsg.stock) : parseFloat(this.pageData.stock)
				if (parseFloat(this.v_input) == num) {
					this.stockShort = true;
					uni.showToast({
						icon: 'none',
						title: '库存不足!'
					})
				}
				if (parseFloat(this.v_input) < num) {
					this.v_input = parseInt(this.v_input) + 1;
				}

			},
			
			//  判断用户是否有权限购买商品
			judgmentBuyPower(type){
				let that = this;
				that.$http.post({
					url:'/zzj_singleSaleApi/judgmentBuyPower',
					data:{
						bid:uni.getStorageSync('bid'),
						v_id:uni.getStorageSync('vid'),
						goods_id:that.goodsid
					}
				}).then(res=>{
					if(res.code == '100'){
						if(that.pageData.bind == 0){
							that.showModal2 = true
							return
						}
						if (that.pageData.show_time == 1 && that.pageData.goods_state == 2) {
							uni.showToast({
								icon: "none",
								title: "活动未开始哦"
							})
							return
						}
						if (that.pageData.show_time == 1 && that.pageData.goods_state == 0) {
							uni.showToast({
								icon: "none",
								title: "活动已结束哦"
							})
							return
						}
						that.clickBtnType = type
						that.isShow = !that.isShow;
					}
					if(res.code == 'jumpRoute' ||  res.code == 'jumpUrl' && res.data != ''){
						that.showModal2 = true;
						that.msg = res.msg;
						that.title = res.title;
						that.btn1 = res.btn1;
						that.btn2 = res.btn2;
						that.btn1_url = res.btn1_url;
						that.btn2_url = res.btn2_url;
						that.jump = res.code;
					}
				})
			},
			
			viewIsShow: function(type) {
				// type:  1一件购买  2一件开团  3加入购物车
				var buyState = uni.getStorageSync('buyState');
				if (buyState == 0) {
					uni.showToast({
						title: "当前用户无购买权限！",
						duration: 1500,
						icon: 'none'
					})
					return
				}
				let vid = uni.getStorageSync("vid")
				if (!vid) {
					that.showModal = true;
				} else {
					that.judgmentBuyPower(type);  // 有vid有，判断是否有权限购买
				}
			},
			count_down_time: function(start_time) {
				//倒計時方法
				var time = Number(start_time);
				var _setInterval = setInterval(() => {
					if (time != 0) {
						time--;
					} else {
						clearInterval(_setInterval);
						this.getPageData()
					}
					var day = Math.floor(time / 60 / 60 / 24);
					var hour = Math.floor(time / 60 / 60 % 24) < 10 ? "0" + Math.floor(time / 60 / 60 % 24) : Math.floor(time / 60 /
						60 % 24);
					var minute = Math.floor(time / 60 % 60) < 10 ? "0" + Math.floor(time / 60 % 60) : Math.floor(time / 60 % 60);
					var second = Math.floor(time % 60) < 10 ? "0" + Math.floor(time % 60) : Math.floor(time % 60);
					this.days = day;
					this.hours = hour;
					this.minutes = minute;
					this.seconds = second;
					time = Number(time);
				}, 1000);
			},
			getPageData: function() { //页面初始化数据
				let vid = uni.getStorageSync("vid")
				that.$http.post({
					url: '/singleSaleApi/singleDetails',
					data: {
						v_id: vid,
						bid: that.bid,
						goods_id: that.goodsid
					}
				}).then(res => {
					if (res.status) {
						that.pageData = res.data;
						that.getComment();
						that.getUlike()
						uni.setNavigationBarTitle({
							title: that.pageData.goods_name
						})
						if (that.pageData.show_time == 1 && that.pageData.goods_state == 1) {
							that.count_down_time(that.pageData.goods_end_time)
						}
						if (that.pageData.show_time == 1 && that.pageData.goods_state == 2) {
							that.count_down_time(that.pageData.goods_start_time)
						}
						if (that.pageData.shop_logo) {
							that.pageData.shop_logo = that.pageData.shop_logo.split(",")[0]
						}
						// 处理规格
						if (that.pageData.getGoodsSpecs && that.pageData.getGoodsSpecs.specsList) {
							that.specsList = that.pageData.getGoodsSpecs.specsList.slice(0);
							that.specsSave = that.specsList;
							len = that.specsList.length
							that.specsString = JSON.stringify(that.specsList)
						}
						if(res.data.goods_content){
							var capture = res.data.goods_content;
							that.pageData.goods_content = that.$common.richTxt(capture).html
						}
						if(res.data.instructions){
							var capture1 = res.data.instructions;
							that.pageData.instructions = that.$common.richTxt(capture1).html
						}
						if(res.data.description3){
							var capture2 = res.data.description3;
							that.pageData.description3 = that.$common.richTxt(capture2).html
						}
						if(res.data.description2){
							var capture3 = res.data.description2;
							that.pageData.description2 = that.$common.richTxt(capture3).html
						}
					} else {
						uni.showToast({
							icon: "none",
							title: res.msg,
							duration: 2000
						})
					}
					clearInterval(timer)
					clearTimeout(timeout)
					that.get_new_order()
					// #ifdef H5
					this.H5Share('pageType=10&gid='+that.goodsid,{
						title: that.pageData.goods_name,
						desc:that.pageData.goods_info,
						imageUrl: that.imgUrl + that.pageData.goods_img
					})
					// #endif
				})
			},
			contact: function() {
				var vid = uni.getStorageSync("vid")
				if (vid) {
					if(that.service_state == 1){ // 客服系统
						uni.navigateTo({
							url: "/userPage/message/consult?shop_id=" + that.pageData.store_id
						})
					}else{
						// uni.navigateTo({
						// 	url: "/userPage/onlineService/webHttp?goodsId=" + that.goodsid
						// })
						that.call()
					}
				} else {
					that.showModal = true
				}
			},
			call(){
				if(!that.pageData.shopMobile){
					that.pageData.shopMobile = uni.getStorageSync('startUp').service_tel
				}
				uni.makePhoneCall({
					phoneNumber: that.pageData.shopMobile
				})
			},
			goodsCollect(){ // 收藏商品
				var vid = uni.getStorageSync("vid")
				if (!vid || vid == 0) {
					that.showModal = true
					return
				}
				that.$http.post({
					url: '/singleSaleApi/goods_collect',
					data: {
						v_id: vid,
						bid: that.bid,
						goods_id: that.goodsid
					}
				}).then(res => {
					if(res.code == 200){
						if(that.pageData.goods_collect == 0){
							that.pageData.goods_collect = 1
						}else{
							that.pageData.goods_collect = 0
						}
					}else{
						uni.showToast({
							title: res.msg,
							icon:'none'
						})
					}
				})
			},
			submitdoods: function() {
				if (that.pageData.getGoodsSpecs && that.pageData.getGoodsSpecs.specsList) {
					if (that.selectNum < len) {
						uni.showToast({
							icon: 'none',
							title: '请选择规格！'
						})
						return
					}
				}
				let param = '?goods_id=' + that.goodsid + '&goods_num=' + that.v_input
				if(that.specs_bind_id){
					param = param + '&specs_bind_id='+that.specs_bind_id + '&specs_bind_text=' + that.specs_bind_text
				}
				if (that.clickBtnType == 1) { // 立即购买
					uni.navigateTo({
						url: '/orderPage/order/createOrder'+ param
					})
				}
				if (that.clickBtnType == 2) { // 一件开团
					uni.navigateTo({
						url: '/orderPage/order/createOrder'+ param +'&open_group=1'
					})
				}
				
				if (that.clickBtnType == 3) { // 加入购物车
					let vid = uni.getStorageSync("vid")
					that.$http.post({
						url: '/zzj_singleSaleApi/joinCart',
						data: {
							v_id: vid,
							num: that.v_input,
							bid: that.bid,
							specs_bind_id: that.specs_bind_id,
							specs_bind_text: that.specs_bind_text,
							goods_id: that.goodsid
						}
					}).then(res => {
						if (res.status) {
							let cartName = that.cartName?that.cartName:'购物车'
							uni.showToast({
								icon: "none",
								title: "在"+cartName+"等你哦",
								duration: 1500
							})
							that.getCart();
							that.isShow = false;
						} else {
							uni.showToast({
								icon: "none",
								title: res.msg,
								duration: 2000
							})
						}
					})
				}
			},
			get_new_order(){
				let that = this;
				clearInterval(timer)
				that.orderList = []
				that.$http.get({
					url: '/singleSaleApi/get_new_order',
					data: {
						order_id: that.order_id,
						goods_id: that.goodsid
					}
				}).then(res => {
					if(res.code == 100 && res.data){
						if(that.order_id)
							that.orderList = res.data.list
						if(res.data.order_id)
							that.order_id = res.data.order_id
						timer = setInterval(()=>{
							that.showTimer = false
							setTimeout(()=>{
								that.showTimer = true
							},10)
							if(that.orderIndex < that.orderList.length-1){
								that.orderIndex ++
							}else{
								clearInterval(timer)
								that.orderIndex = 0
								that.get_new_order()
							}
						},5000)
					}
				})
			},
			orderChange(e){
				that.orderIndex = e.detail.current
			},
		},
		onShareAppMessage(option) {
			var vid = uni.getStorageSync("vid")
			return {
				title: that.pageData.goods_name,
				desc:that.pageData.goods_info,
				path: '/pages/index/index?share_v_id=' + vid + '&pageType=10&gid=' + this.goodsid,
				imageUrl: that.imgUrl + that.pageData.goods_img
			}
		}
	}
</script>

<style scoped lang="scss">
	.boxsShadow{box-shadow: 0 0 8rpx 2rpx rgba(105,105,105,.12);}
	.imgBox {margin-top: 20rpx;}

	
	.footer_info{
		padding-bottom: calc(10rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(10rpx + env(safe-area-inset-bottom));
	}
	.ftr_buy_info .btn3 {
		margin-bottom: constant(safe-area-inset-bottom);
		margin-bottom: env(safe-area-inset-bottom);
	}
	.page{
		background-color: #F8F8F8;
		padding-bottom: 100rpx;
		.top_back{
			width: 60rpx;
			height: 60rpx;
			border-radius: 50%;
			background: rgba(0,0,0,0.35);
			position: fixed;
			top: 30rpx;
			left: 30rpx;
			z-index: 28;
			display: flex;
			align-items: center;
			justify-content: center;
			.icon-xiangzuo{
				color: white;
				font-size: 40rpx;
				margin-left: -4rpx;
				opacity: 0.8;
			}
			.icon-back-home{
				width: 38rpx;
				height: 38rpx;
			}
		}
		
		.goods_text_info {
			.pageData_goods_name_{
				font-size: 32rpx;
				color: #000000;
			}
			.pageData_goods_name{
				overflow: hidden;
				font-size: 32rpx;
				padding: 0 20rpx 20rpx;
				min-height: 60rpx;
			}
			.price_description{
				margin-top: -20rpx;
			}
			.ytx_price_description{
				color: #333333;
				position: relative;
				top: 4rpx;
				font-size: 26rpx;
			}
			.collect-box{
				position: relative;
				top: 10rpx;
				>view{
					text-align: center;
					width: 80rpx;
					height: 80rpx;
				}
				.rtxt{font-size: 22rpx;color: #666666;margin-top: -4rpx;}
				.icon-02,.icon-01{
					font-size: 38rpx;
					color: #666666;
				}
				.icon-01{
					color: $uni-color-follow;
					animation: cc .4s ease-in-out;
				}
				@keyframes cc{
					0%{transform: scale(0.5);}
					50%{transform: scale(1.2);}
					100%{transform: scale(1);}
				}
				.icon-fenxiang1{
					font-size: 40rpx;
					color: #666666;
				}
				.iconfont{
					display: inline-block;
					height: 50rpx;
				}
			}
		}
		
		/* 规格样式 */
		.specification{
			max-height: 640upx;
			overflow-y: auto;
			overflow-x: hidden;
			.speci-list{
				margin-top: 20upx;
			}
			.speci-item{
				border-bottom: 1px solid #F6F6F6;
				padding-bottom: 20upx;
				padding-top: 10upx;
				.speci-title{
					color: #333;
					font-size: 28upx;
					line-height: 70upx;
				}
				.speci-sort-list{
					.speci-sort-item{
						display: inline-block;
						margin-right: 20upx;
						margin-bottom: 20upx;
						background: #F4F4F4;
						border: 1px solid #F4F4F4;
						color: #666;
						padding: 8upx 32upx;
						border-radius: 30upx;
						text{
							font-size: 22upx;
						}
						&.speciActive{
							border: 1px solid #ff4b4e;
							background: rgb(255, 240, 240);
							color: #ff4b4e;
						}
						&.speciNomal{
							color: #666;
						}
						&.speciNone{
						    color: #c7c7c7;
						}
					}
				}
			}
		}
		
		// 顶部导航
		.detail_tab_box{
			background-color: #FFFFFF;
			box-shadow: 0 0 6rpx 1px #F5F5F5;
			top: -520rpx;
			left: 0;
			right: 0;
			z-index: 29;
			position: fixed;
			display: flex;
			flex-direction: column;
			&.show{
				top: 0;
			}
			.fixed_box{
				display: flex;
				align-items: center;
				flex: 1;
				.icon-back-box{
					display:  flex;
					align-items: center;
					padding: 0 30rpx 0 20rpx;
					.icon-xiangzuo{
						font-size: 32rpx;
					}
				}
				.detail_tab{
					align-items: center;
					display: flex;
					flex: 1;
					justify-content: center;
					.tab{
						position: relative;
						text-align: center;
						font-size: 28rpx;
						color: #555555;
						min-width: 100rpx;
						text{
							position: absolute;
							width: 40rpx;
							height: 6rpx;
							border-radius: 6rpx;
							top: 115%;
							left: calc(50% - 20rpx);
							background-color: var(--color);
							display: none;
						}
						&.active{
							font-size: 30rpx;
							font-weight: bold;
							color: var(--color);
							text{
								display: block;
							}
						}
					}
				}
				.menuButton{
					/* #ifdef MP */
					margin-right: 6px;
					/* #endif */
				}
			}
		}
		
		.goods_info{
			box-sizing: border-box;
			padding-bottom: calc(10rpx + constant(safe-area-inset-bottom));
			padding-bottom: calc(10rpx + env(safe-area-inset-bottom));
		}
		
	}
	
	.price2_num::before{
		font-size: 32rpx;
		font-weight: bold;
	}
	.minusBottomBox {
		width: 24upx;
		height: 24upx;
		margin: 16upx;
	}

	.ftr_buy_info_goods_thumb image {
		width: 100%;
		height: 100%;
	}

	.swiper__main,
	.swiper__cell,
	.swiper__img,
	.play_video {
		width: 100%;
		height: 100%;
	}

	.goods_swiper_list {
		position: relative;
		.buy-success{
			position: absolute;
			left: 30rpx;
			top: 130rpx;
			height: 236rpx;
			background-color: rgba(0,0,0,0.5);
			padding: 8rpx 10rpx;
			border-radius: 6rpx;
			height: 56rpx;
			max-width: 400rpx;
			animation: totop 1s linear forwards;
			@keyframes totop{
				0%{
					top: 180rpx;
					opacity: 0;
				}
				100%{
					top: 130rpx;
					opacity: 1;
				}
			}
			.avatar{
				width: 40rpx;
				height: 40rpx;
				border-radius: 50%;
				margin-right: 10rpx;
			}
			text{
				color: white;
			}
		}
	}

	.goods_swiper_pagination,
	.full_atlas_pagination {
		position: absolute;
		z-index: 9;
	}

	.backImg {
		width: 30upx;
		height: 30upx;
		margin: 15upx;
	}

	.cross_btn_video {
		width: 70%;
		height: 70%;
		margin: 15%;
	}

	.play_video,
	.video_time {
		position: absolute;
	}

	.video_time {
		right: 46upx;
	}

	#share_img {
		width: 100%;
		height: 100%;
	}

	.statebar {
		height: 128upx;
		line-height: 128upx;
	}

	.ftr_buy_info_goods_info .tag.color3 {
		align-items: flex-end;
		position: relative;
		width: auto;
		padding: 0 20rpx;
		height: 40rpx;
		line-height: 40rpx;
		margin-left: 10rpx;
	}
	
	// 倒计时（new）
	.my-timer-box{
		height: 130rpx;
		background-color: #E02E24;
		.left-box{
			display: flex;
			align-items: center;
			padding-left: $uni-page-space;
			color: white;
			.myPrice{
				font-size: 46rpx;
				font-weight: bold;
				margin-right: 10rpx;
				&::before{
					font-size: 28rpx;
					font-weight: bold;
				}
			}
			.restrict_buy{
				text{
					margin-right: 6rpx;
				}
			}
			.tag_{
				background-color: #FED5B2;
				color: #E02E24;
				font-weight: bold;
				padding: 2rpx 14rpx;
				border-radius: 16rpx;
				max-width: 230rpx;
			}
		}
		.right-box{
			background-color: #D7190D;
			display: flex;
			align-items: center;
			padding: 0 $uni-page-space;
			position: relative;
			&::before{
				content: '';
				position: absolute;
				border: 20rpx solid rgba(0,0,0,0);
				border-right-color: #D7190D;
				left: -34rpx;
			}
			&-title{
				text-align: center;
				color: white;
				font-size: 28rpx;
				padding-bottom: 10rpx;
			}
			&-time{
				display: flex;
				align-items: center;
				justify-content: center;
				.b0x{
					color: white;
					width: 46rpx;
					height: 46rpx;
					border-radius: 8rpx;
					text-align: center;
					line-height: 46rpx;
					font-size: 30rpx;
					background-color: rgba(0,0,0,0.2);
				}
				.day{
					color: white;
					font-size: 30rpx;
					padding-right: 6rpx;
				}
				.dot{
					color: white;
					font-size: 30rpx;
					padding:0 6rpx;
				}
			}
		}
	}
	

	.btnBox {
		display: flex;
		justify-content: space-between;
		height: 72upx;
		border-radius: 40px;
		overflow: hidden;
	}

	.addcart {
		flex: 1;
		line-height: 72upx;
		border-radius: 36upx 0 0 36upx;
		background: #EC5B30;
	}

	.addBuy {
		flex: 1;
		border-radius: 0 36upx 36upx 0;
		background: #F2AA3B;
	}
	
	
	
	/* 评价 */
	.pjContent {
		padding: $uni-page-space 0;
		background-color: #FFFFFF;
		margin-top: 16rpx;
		.title{
			padding: 0 $uni-page-space;
			.txt,.pjCount{
				font-size: 28rpx;
				font-weight: bold;
				margin-right: 10rpx;
			}
			.icon{
				font-weight: normal;
				.num{
					margin-right: 10rpx;
					color: #999999;
					font-size: 26rpx;
				}
			}
		}
		.commentList{
			padding: $uni-page-space;
			padding-bottom: 0;
			.commentItem{
				padding: $uni-page-space;
				background-color: #FFFFFF;
				margin-bottom: 40rpx;
				&:nth-last-child(1){
					margin-bottom: 0;
				}
				&.noReplayRadious{
					border-radius: 10rpx 10rpx 0 70rpx;
					}
				.userHead{
					width: 58rpx;height: 58rpx;
					border-radius: 50%;
					margin-right: $uni-page-space;
				}
				.userName{margin-right: 10rpx;}
				.commentContent{
					padding: 30rpx 30rpx 0;
					.starBox{
						position: relative;
						margin-left: -6rpx;
						.starMask{
							position: absolute;
							height: 100%;
							top: 0;left: 0;
							background: #FFFFFF;
							overflow: hidden; 
							opacity: .8;
							white-space: nowrap;
						}
					}
					.usercmt{color: #333333;margin-top: 20rpx;}
					.goodsName{
						color: #999999;
						margin-top: 20rpx;
					}
					.time{
						font-size: 20rpx; 
						color: #999999;
					}
				}
				.storeReplay{
					margin: 30rpx -30rpx -30rpx -30rpx;
					padding: 30rpx 60rpx;
					.thmeBg{
						position: absolute;
						width: 100%;height: 100%;
						top: 0;left: 0;
						border-radius: 0 0 10rpx 10rpx;
						opacity: .05;
					}
					.replayS{opacity: 0.8;}
					.replayT{opacity: 0.6;}
					.replayTxt{margin-top: 20rpx;}
				}
				.noReplay{
					height: 78rpx;
					margin: -30rpx -30rpx -40rpx -30rpx;
					z-index: -1;
					.thmeBg{
						position: absolute;
						width: 100%;height: 100%;
						top: 0;left: 0;
						border-radius: 0 0 10rpx 10rpx;
						opacity: .05;
					}
				}
			}
			.more{width: 200rpx;line-height: 56rpx;margin: 0 auto;text-align: center;border-radius: 46rpx;}
		}
		
		.noPJ{
			margin-top: 30rpx;
			text-align: center;
			color: #666666;
		}
	}

	// 评价标签
	.comment-tags{
		text{
			display: inline-block;
			line-height: 40rpx;
			border-radius: 40rpx;
			border: 1px solid #EEEEEE;
			color: #999999;
			font-size: 26rpx;
			padding: 0 20rpx;
			margin-right: 20rpx;
			margin-top: 14rpx;
		}
	}
	.level-box{
		margin-top: 20rpx;
		.title{
			margin-right: 20rpx;
		}
		.comment-tags{
			text{margin-top: 0;}
		}
	}
	
	
	/* 推荐商品 */
	.detail_recommend_box{
		background-color: #FFFFFF;
		margin-top: 16rpx;
		.detail_recommend{
			flex-wrap: wrap;
			padding-left: 24rpx;
			padding-bottom: 30rpx;
			.detail_recommend_goods{
				width: calc(50% - 24rpx);
				margin-right: 20rpx;
				margin-bottom: 20rpx;
				position: relative;
				.item{
					padding: 4rpx 4rpx 10rpx;
					border-radius: 8rpx;
					.detail_recommend_goods_name{
						margin: 10rpx 4rpx;
						line-height: 30rpx;
						height: 60rpx;
					}
					.detail_recommend_goods_price{
						font-weight: bold;
						font-size: 30rpx;
						margin-left: 4rpx;
					}
				}
				image{
					width: 100%;
					border-radius: 8rpx 8rpx 0 0;
					height: 333rpx;
				}
			}
			
			
		}
	}

	.mid_title{
		text-align: center;
		position: relative;
		padding: 20rpx;
		text{
			font-size: 28rpx;
			font-weight: bold;
		}
		.bline{
			display: block;
			margin: 6rpx auto 0;
			height: 6rpx;
			border-radius: 6rpx;
			width: 68rpx;
		}
	}
	
	
	
	
	
	
	/* 最新评价、店铺介绍、推荐商品 start */
	.goods_store_box{
		background: #ffffff;
		margin-top: 16rpx;
	}

	.goods_info .goods_store{
		display: flex;
		display: -webkit-flex;
		justify-content: space-between;
		align-items: center;
		padding: 24rpx;
	}
	.goods_store .goods_store_thumb{
		width: 88rpx;
		height: 88rpx;
		border-radius: 10rpx;
		margin-right: 20rpx;
	}
	
	.goods_store .goods_store_info{
		display: flex;
		display: -webkit-flex;
	}
	.goods_store .storeName{
		font-weight: bold;
		font-size: 30rpx;
		margin-bottom: 14rpx;
		margin-top: -6rpx;
	}
	.storeType{
		color: #999;margin-top: 6rpx;
		text{color: #999;}
		.icon-dianhua{
			font-size: 34rpx;
			margin-right: 10rpx;
		}
		.tel{
			font-size: 28rpx;
		}
	}
	.goods_store_info .g_s_info_item{
		display: flex;
		display: -webkit-flex;
		text-align: center;
	}
	.g_s_info_item .g_s_i_num{
		color: #ff4b4e;
		margin: 0 20rpx 0 6rpx;
		font-weight: bold;
	}
	.relative{position: relative;}
	
	
	.goods_store_btns{
		padding: 20rpx 0 20rpx;
	}
	.goods_store_btn{
		width: 210rpx;
		line-height: 52rpx;
		border: 1px solid #C0C0C0;
		border-radius: 56rpx;
		justify-content: center;
		margin:0 20rpx;
		position: relative;
	}
	.goods_store_btn text{
		color: #232323;
		font-weight: bold;
	}
	.goods_store_btn .iconfont{
		font-size: 30rpx;
		margin-right: 8rpx;
		font-weight: normal;
	}
	/* 最新评价、店铺介绍、推荐商品 end */
	// 销量
	.sale-box{
		padding: 20rpx $uni-page-space;
		background-color: #FFFFFF;
		margin-top: 16rpx;
		view{
			padding: 0 40rpx;
			&:nth-child(1){
				padding-left: 0;
			}
			.txt{
				color: #999999;
			}
			.num{
				font-size: 30rpx;
			}
		}
		.li{
			height: 28rpx;
			width: 2rpx;
			display: inline-block;
			background-color: #DDDDDD
		}
		
	}
	
	.pageData_goods_info{
		padding: 20rpx $uni-page-space;
		background-color: #FFFFFF;
		margin-top: 16rpx;
	}
	.ftr_info_oper_item_c{
		text-align: center;
	}
	.btnone{
		background: #AFAFAF;
		line-height: 72rpx;width: 100%;border-radius: 72rpx;
		text-align: center;
		text{
			font-size: 28rpx;
		}
	}
	
	// 适用门店
	.store-useful{
		padding: $uni-page-space;
		background-color: #ffffff;
		margin-top: 16rpx;
		.txt{
			margin-right: 10rpx;
		}
		.title{
			font-size: 30rpx;
			font-weight: bold;
		}
		.store-useful-list{
			width: 100%;
			background-color: #FFFFFF;
			position: absolute;
			bottom: 0;
			left: 0;
			min-height: 33vh;
			max-height: 60vh;
			flex-direction: column;
			border-radius: 20rpx 20rpx 0 0;
			@keyframes show{
				0%{bottom: -50vh;}
				100%{bottom: 0;}
			}
			animation: show .2s linear;
			.title{
				padding: $uni-page-space;
				border-bottom: 1px solid #F2F2F2;
				font-size: 32rpx;
				.icon-store{
					font-size: 32rpx;
					margin-right: 10rpx;
				}
			}
			.list{
				flex: 1;
				overflow-y: auto;
				padding: $uni-page-space;
				.goods_store{
					border-bottom: 1px solid #F2F2F2;
					padding: 0;
					padding-bottom: 20rpx;
					margin-bottom: 20rpx;
				}
				.lines{color: #999999;}
			}
		}	
	}
	
	// 详情
	.goods_detail{
		margin-top: 16rpx;
		background-color: #FFFFFF;
		padding-bottom: 10rpx;
		min-height: 80rpx;
	}
	.swiper-content{
		background-color: #FFFFFF;
		margin-bottom: 16rpx;
	}
	
	
	.goods_c{
		padding: 16rpx;
	}
	.Tips{
		padding: 24rpx;
	}
	
	.Rebate{
		// position: absolute;
		height: 0;
		text-align: right;
		
		.t{
			position: relative;
			z-index: 23;
			display: inline-block;
			top: -64rpx;
			z-index: 10;
			line-height: 60rpx;
			padding: 0 20rpx;
			right: 4rpx;
			border-radius: 12rpx;
			color: white;
			.icon-guanbi{
				font-size: 34rpx;
				display: inline-block!important;
				padding-left: 10rpx;
				position: relative;
				z-index: 26;
				margin-top: 0;
			}
		}
		.tri{
			position: relative;
			right: 40rpx;
			top: -38rpx;
			transform: rotate(45deg);
			z-index: 25;
			width: 16rpx;
			height: 16rpx;
			display: inline-block;
			
		}
	}
	
	
	
</style>
